Skip to content
main
Switch branches/tags
jam0001/LexicalCrimes/
jam0001/LexicalCrimes/

Latest commit

* Add complete source

* Add dir not submodule

* Update README.md

* Update README.md

* mark as late entry

Co-authored-by: Mufeed VH <mufeedvh@gmail.com>
8dcc82b

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
Aug 23, 2021
Aug 23, 2021

regretti github doesn't have this emoji :(🍝

A programming language where comments are the first-class citizen and ASCII art flowcharts are the controls!


Made for Lang Jam (jam0001) theme: first-class comments in 48 hours.

Summary

What if all those "TODO:" comments and beautiful ASCII art diagrams in your code actually worked? Presenting you the one and only regretti, write your spaghetti and forgetti!

Basically, I took the theme "literally"!

So comments are commands!

You can only run instruction statements inside a comment! 💬

Table of Contents

Goals

  • Teaching: What initially started as a troll/esoteric language, it language could be used to teach kids "Control Flows" visually.
  • High-performance: The existing functionality/examples runs faster than most interpreted languages!
  • Helpful Error Messages: Almost every errors will be catched and prints out a helpful error message as to denote what went wrong. (Inspired from Rust ❤️)

Installation

NOTE: Please run on Linux.

$ git clone https://github.com/mufeedvh/regretti.git
$ cd regretti/
$ cargo build --release
$ ./target/release/regretti

Hello World

Lo and behold!

main:
    /*
        +----------------------+
        | print "Hello World!" |
        +----------------------+
    */

Loops


main:
    let count = 69420

    /*
        +--------+
        | loop 5 |<----------+
        +--------+           |
             |               v
             |               +-----------------------+
             |               | print count           |
             |               +-----------------------+
             |               ^
             |               |
             +---------------+
    */
:end

Get more examples below!

Examples

Examples are the best way to learn regretti, these cover all the features and functionalities of the language:

All other examples have not been completely implemented yet.

Also I am pretty sure there are a lot of bugs, this is probably the most obscure syntax for parsing lol...

Flow Charts?

Internals

In a nutshell:

https://xkcd.com/1209/